From 51e9c38658f243ba095cf23bfbb396789a25e285 Mon Sep 17 00:00:00 2001 From: "iap10@labyrinth.cl.cam.ac.uk" Date: Fri, 17 Oct 2003 01:09:13 +0000 Subject: [PATCH] bitkeeper revision 1.526 (3f8f4139NGtfXYTOvQIloULmYg2ktg) Add a couple of software performance counters to the page table update routines. --- xen/common/memory.c | 4 ++++ xen/include/xeno/perfc_defn.h | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/xen/common/memory.c b/xen/common/memory.c index 5070b511af..94fb51d634 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -809,8 +809,12 @@ int do_process_page_updates(page_update_request_t *ureqs, int count) unsigned int cmd; unsigned long cr0 = 0; + perfc_incrc( calls_to_process_page_updates ); + perfc_addc( num_page_updates, count ); + for ( i = 0; i < count; i++ ) { + if ( unlikely(copy_from_user(&req, ureqs, sizeof(req)) != 0) ) { if ( cr0 != 0 ) write_cr0(cr0); diff --git a/xen/include/xeno/perfc_defn.h b/xen/include/xeno/perfc_defn.h index 0d38959022..25f8cdafd9 100644 --- a/xen/include/xeno/perfc_defn.h +++ b/xen/include/xeno/perfc_defn.h @@ -17,3 +17,9 @@ PERFCOUNTER( net_tx_transmitted, "net tx transmitted" ) PERFCOUNTER_CPU( domain_page_tlb_flush, "domain page tlb flushes" ) PERFCOUNTER_CPU( need_flush_tlb_flush, "PG_need_flush tlb flushes" ) + +PERFCOUNTER_CPU( calls_to_process_page_updates, "calls_to_process_page_updates" ) +PERFCOUNTER_CPU( num_page_updates, "num_page_updates" ) + + + -- 2.30.2